package parserTable;
import java.util.*;

public class NTerminais {

	private String nome;
	private ArrayList<Grammar> Gramalist = new ArrayList<Grammar>();

	public NTerminais(String nome){
		this.nome=nome;
	}
	
	public String getnome(){
		return this.nome;
	}
        public void setnome(String x){
             this.nome=x;
	}
	
	public void adiciona(Grammar o){
		Gramalist.add(o);
	}
	
	public Object Glista(String x)
	{
		Grammar y;
		Object aux;
		int i=0;
		while (i < Gramalist.size()){
			aux = Gramalist.get(i);
			y = (Grammar)aux;
			if (y.getchave().equals(x)){
				return y;
			}
			i++;
		}
		
		return null;
	}
      /*  public Object Glista(char x)
	{
		Grammar y;
		Object aux;
		int i=0;
		while (i < Gramalist.size()){
			aux = Gramalist.get(i);
			y = (Grammar)aux;
			if (y.getchave() == x){
				return y;
			}
			i++;
		}
		
		return null;
	}
         * */
         
}
		

